import request from '@/utils/request'

// 查询柜号列表
export function listCabinet(query) {
  return request({
    url: '/wms/cabinet/list',
    method: 'get',
    params: query
  })
}

// 初始化
export function initBean(data) {
    return request({
        url: '/wms/cabinet/initBean',
        method: 'post',
        data: data
    })
}

// 查询柜号详细
export function getCabinet(id) {
  return request({
    url: '/wms/cabinet/' + id,
    method: 'get'
  })
}

// 新增柜号
export function addCabinet(data) {
  return request({
    url: '/wms/cabinet',
    method: 'post',
    data: data
  })
}

// 修改柜号
export function updateCabinet(data) {
  return request({
    url: '/wms/cabinet',
    method: 'put',
    data: data
  })
}

// 删除柜号
export function delCabinet(id) {
  return request({
    url: '/wms/cabinet/' + id,
    method: 'delete'
  })
}
// 新增库位
export function addBatchCabinet(data) {
  return request({
    url: '/wms/cabinet/addBatchCabinet',
    method: 'post',
    data: data
  })
}
